import http from "@/http/index.ts";
import {ProjectDocument, ProjectDocumentListParam} from "./type";

// 分页条件查询列表
export const getProjectDocumentListApi = (data: ProjectDocumentListParam) => {
    return http.get("/project/getProjectDocumentList", data);
};
// 查询进行中项目列表
export const getSimpleProject = () => {
    return http.get("/project/getSimpleProject");
};

// 查询所有列表
export const getSimpleProjectAll = () => {
    return http.get("/project/getSimpleProjectAll");
};
// 获取详情
export const getProjectDocumentApi = (id: number) => {
    return http.get(`/project/getProjectDocument/${id}`);
};

// 新增
export const addProjectDocumentApi = (data: ProjectDocument) => {
    return http.post("/project/createProjectDocument", data);
};

// 编辑
export const editProjectDocumentApi = (data: ProjectDocument) => {
    return http.put("/project/updateProjectDocument", data);
};

// 删除
export const deleteProjectDocumentApi = (id: number) => {
    return http.delete(`/project/deleteProjectDocument/${id}`);
}; 